package com.web.security.token;

import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * Created with IntelliJ IDEA.
 * User: xf
 * Date: 2016/4/21
 * Time: 20:16
 * To change this template use Editor | File and Code Templates.
 */
public class FrontAuthenticationToken extends AbstractAuthenticationToken {

    private String username;
    private String password;
    private String validateCode;

    public FrontAuthenticationToken(String username, String password, String validateCode, Collection<? extends GrantedAuthority> authorities) {
        super(authorities);
        this.username = username;
        this.password = password;
        this.validateCode = validateCode;
    }

    public String getValidateCode() {
        return validateCode;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    @Override
    public Object getCredentials() {
        return null;
    }

    @Override
    public Object getPrincipal() {
        return null;
    }
}
